<%-- 
    Document   : category
    Created on : Mar 9, 2013, 2:56:23 PM
    Author     : duonghung1369
--%>

<%@tag description="left column" pageEncoding="UTF-8"%>

<%-- The list of normal or fragment attributes can be specified here: --%>
<%@taglib prefix="s" uri="/struts-tags" %>

<%-- any content can be specified here e.g.: --%>
<div id="category">
    <ul id="nav">
        <s:iterator status="categoryStatus" value="categories" id="parent">
            <li>
                <span class="parent-category"><s:property value="name" /></span>
                <s:if test="#parent.child_categories.size() > 0">
                    <ul>
                        <s:iterator value="child_categories" id="child">
                            <li>
                                <a class="child-category" href="../product/list.html?category_id=<s:property value="id" />"><s:property value="name" /></a>
                                <input name="category_id" value="<s:property value="id" />" style="display: none;"/>
                            </li>
                        </s:iterator>
                    </ul>
                </s:if>
            </li>
        </s:iterator>
    </ul>
</div>